package com.xthh._struct;

import android.content.Context;
import android.graphics.Color;


public class HH_T_RGB {
    int r;
    int g;
    int b;
    Context ctx;


    public HH_T_RGB(int r, int g, int b, Context ctx) {
        this.r = r;
        this.g = g;
        this.b = b;
        this.ctx = ctx;
    }

    public int getColor(){
        return Color.rgb(r, g, b);
    }
    public int getColor2(){
        return Color.argb(255, r, g, b);
    }
    public HH_T_RGB(int r, int g, int b) {
        this.r = r;
        this.g = g;
        this.b = b;
    }

    public void setRGB(int value){
        this.r = value;
        this.g = value;
        this.b = value;
    }

    public void setRGB(int r, int g, int b, Context ctx){
        this.r = r;
        this.g = g;
        this.b = b;
        this.ctx = ctx;
    }

    public int getR() {
        return r;
    }


    public void setR(int r) {
        this.r = r;
    }

    public int getG() {
        return g;
    }

    public void setG(int g) {
        this.g = g;
    }

    public int getB() {
        return b;
    }

    public void setB(int b) {
        this.b = b;
    }

    public String getRGBs(){
        return String.format("%d,%d,%d", r, g, b);
    }


}
